package org.learn.tankgame4;

public class Tank {
    private int x;
    private int y;
    private int direct;//0123坦克方向
    private int spend;//坦克的速度
    boolean isLive = true;
    //上右下左移动方法
    public void moveUp(){
        y -= spend;
    }
    public void moveRight(){
        x += spend;
    }
    public void moveDown(){
        y += spend;
    }
    public void moveLeft(){ x -= spend; }


    public int getSpend() {
        return spend;
    }

    public void setSpend(int spend) {
        this.spend = spend;
    }

    public int getDirect() {
        return direct;
    }

    public void setDirect(int direct) {
        this.direct = direct;
    }

    public Tank(int x, int y) {
        this.x = x;
        this.y = y;

    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }


}
